#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
int cnt = 0;
void dfs(int u, int right)
{
    if (right == 7) cnt++;
    if (u > 30||right>=10) return;
    dfs(u + 1, right + 1);
    dfs(u + 1, 0);
}
int main()
{
    dfs(1, 0);
    cout << (1 << 23) << endl;
    cout << cnt << endl;
    return 0;
}